import axios from '../axios'

export const getAll = () => {
   return axios.request<CommontModel[]>({ url: 'admin/commont/findall' })
}

// 删除
export const remove = (id: number) => {
   return axios.request({ url: `admin/commont/${id}`, method: 'delete' })
}

// 获取某个评论
export const getCommontById = (id: number) => {
   return axios.request<CommontModel>({ url: `admin/commont/${id}` })
}

// 根据用户名获取评论
export const getCommontByUserName = (username: string) => {
   return axios.request<CommontModel[]>({ url: `admin/commont/user/${username}` })
}
